<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('applynumbers/index')}">站点列表</a></li>
			<li ><a href="{:url('applynumbers/add')}">添加站点</a></li>
			<li class="active"><a>编辑站点列表</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('applynumbers/editPost')}">
			<div class="form-group">
				<label for="input-apply_name" class="col-sm-2 control-label"><span class="form-required">*</span>公司名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_name" name="apply_name" value="{$apply_name}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_url" class="col-sm-2 control-label"><span class="form-required">*</span>申户域名</label>
				<div class="col-md-6 col-sm-10">
					<textarea name="apply_url" style="width:100%; height: 120px;">{$apply_url}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_one_agent" class="col-sm-2 control-label"><span class="form-required">*</span>首次代理</label>
				<div class="col-md-6 col-sm-10">
					<php>
						$apply_one_agent = explode(',', $apply_one_agent);
					</php>
					<foreach name="apply_agent_config" item="vo">
						<php>
							$checked = "";
							if(in_array($key, $apply_one_agent)){
								$checked = "checked";
							}
						</php>
						<div style="width:100px; float: left; margin-left: 10px;"><input type="checkbox" {$checked} name="apply_one_agent[]" value="{$key}" style="zoom:120%;">&nbsp;&nbsp;{$vo}</div>
					</foreach>
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_one_blong" class="col-sm-2 control-label"><span class="form-required">*</span>归属一代</label>
				<div class="col-md-6 col-sm-10">
					<php>
						$apply_one_blong = explode(',', $apply_one_blong);
					</php>
					<foreach name="apply_agent_config" item="vo">
						<php>
							$checked = "";
							if(in_array($key, $apply_one_blong)){
								$checked = "checked";
							}
						</php>
						<div style="width:100px; float: left; margin-left: 10px;"><input type="checkbox" {$checked} name="apply_one_blong[]" value="{$key}" style="zoom:120%;">&nbsp;&nbsp;{$vo}</div>
					</foreach>
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_two_blong" class="col-sm-2 control-label"><span class="form-required">*</span>归属二代</label>
				<div class="col-md-6 col-sm-10">
					<php>
						$apply_two_blong = explode(',', $apply_two_blong);
					</php>
					<foreach name="apply_agent_config" item="vo">
						<php>
							$checked = "";
							if(in_array($key, $apply_two_blong)){
								$checked = "checked";
							}
						</php>
						<div style="width:100px; float: left; margin-left: 10px;"><input type="checkbox" {$checked} name="apply_two_blong[]" value="{$key}" style="zoom:120%;">&nbsp;&nbsp;{$vo}</div>
					</foreach>
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_main_status" class="col-sm-2 control-label"><span class="form-required">*</span>主体状态</label>
				<div class="col-md-6 col-sm-10">
					<select class="form-control" name="apply_main_status">
						<foreach name="apply_main_status_config" item="vo">
							<php>$status_selected=($apply_main_status == $key)?"selected":"";</php>
						 	<option value="{$key}" {$status_selected} >{$vo}</option>
						 </foreach>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_get_number" class="col-sm-2 control-label"><span class="form-required">*</span>开户数</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_get_number" name="apply_get_number" value="{$apply_get_number}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_done_number" class="col-sm-2 control-label"><span class="form-required">*</span>下户数</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_done_number" name="apply_done_number" value="{$apply_done_number}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_get_date" class="col-sm-2 control-label"><span class="form-required">*</span>申户日期</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_get_date" name="apply_get_date" value="{$apply_get_date}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_done_date" class="col-sm-2 control-label"><span class="form-required">*</span>下户日期</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_done_date" name="apply_done_date" value="{$apply_done_date}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_group" class="col-sm-2 control-label"><span class="form-required">*</span>申户组</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_group" name="apply_group" value="{$apply_group}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_user" class="col-sm-2 control-label"><span class="form-required">*</span>负责人</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-apply_user" name="apply_user" value="{$apply_user}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apply_image" class="col-sm-2 control-label"><span class="form-required">*</span>照片</label>
				<div class="col-md-6 col-sm-10">
					<?php
						$apply_image_show = 'http://'.$_SERVER['HTTP_HOST'].'/upload/'.$apply_image;
					?>
					<img id="photo-1-preview" style="width:50px; height:50px;" src="{$apply_image_show}">

					<input id="photo-1" type="hidden" name="apply_image" value="{$apply_image}">
					<a href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>
				</div>
			</div>

			<div class="form-group">
                                <label for="input-isblack" class="col-sm-2 control-label"><span class="form-required">*</span>是否拉黑</label>
                                <div class="col-md-6 col-sm-10">
                                        <select class="form-control" name="isblack">
                                                <option value="1" <?php if($isblack == '1') echo 'selected'?> >正常</option>
                                                <option value="2" <?php if($isblack == '2') echo 'selected'?> >拉黑</option>
                                        </select>
				</div>
			</div>
			
			<div class="form-group">
				<label for="input-apply_remark" class="col-sm-2 control-label"><span class="form-required">*</span>备注</label>
				<div class="col-md-6 col-sm-10">
					<textarea name="apply_remark" style="width:100%; height: 120px;">{$apply_remark}</textarea>
				</div>
			</div>
			
			<div class="col-sm-offset-2 col-sm-10">
				<input type="hidden" name="id" value="{$id}" />
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
